@file:Suppress("DEPRECATION")

package com.shakespace.artofandroid.temp

import android.os.AsyncTask
import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import com.shakespace.firstlinecode.global.TAG
import io.reactivex.Observable

@Suppress("DEPRECATION")
class TempActivity : AppCompatActivity() {
    val threadLocal = ThreadLocal<Boolean>()
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val create = Observable.create<String> {
            it.onNext("")
        }
        Log.e(this.TAG, "onCreate: ")
        MyTask().execute("")
        MyTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, "")
    }

    override fun onStart() {
        super.onStart()
        Log.e(TAG, "onStart: ")
    }

    override fun onResume() {
        super.onResume()
        Log.e(this.TAG, "onResume: ")
    }

    override fun onPause() {
        super.onPause()
        Log.e(this.TAG, "onPause: ")
    }

    override fun onStop() {
        super.onStop()
        Log.e(this.TAG, "onStop: ")
    }

    override fun onDestroy() {
        super.onDestroy()
        Log.e(this.TAG, "onDestroy: ")
    }
}

class MyTask : AsyncTask<String, String, String>() {
    override fun doInBackground(vararg params: String?): String {
        return ""
    }
}
